<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ include file="/common/meta.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>相似结果查看</title>

<%-- <script type="text/javascript" src="${res}/js/jquery/jquery.js"></script> --%>
<%-- <link href="${res }/css/public.css" rel="stylesheet" type="text/css" /> --%>
<%-- <link href="${res}/css/information.css" rel="stylesheet" type="text/css" /> --%>
<style type="text/css">
.project_box01{ float:left;  width:49%; }
.project_box02{ float:right; width:49%;}
.project01 {
	display: inline-block;
	zoom:1;
	*display:inline;
}
.outer {
	display: inline-block;
	zoom:1;
	*display:inline;
	width: 60%;
	table-layout: fixed;
}
</style>

<script type="text/javascript">
	$(document).ready(function(){
		

		$("table.t_css").each(function(){
			$(this).find("tr").not($(".cbTable").find("tr")).each(function(index){
				if(index%2==0)
					$(this).removeClass("li_1").addClass("li_2");
				else
					$(this).removeClass("li_2").addClass("li_1");
			});
		});
		
		$("#right").scroll(function () {
			//var left = document.getElementById("left");
			//var right = document.getElementById("right");
			//left.scrollTop = right.scrollTop;
		});
		$("#left").scroll(function () {
			/* var left = document.getElementById("left");
			var right = document.getElementById("right");
			right.scrollTop = left.scrollTop; */
		});
		
		$(".sameStr").click(function(){
		
			var tempValue=$("#tempName").val();
			//清除上次保留的颜色
			if(tempValue !=""){
				$("span[id="+tempValue+"_0]").attr("style","color: #FF0000;  background-color: #FFFFFF");
				$("span[id="+tempValue+"]").attr("style","color: #FF0000;  background-color: #FFFFFF");
			}
			
			var sameStr=this.attributes["href"].value;
			var value=sameStr.split("#")[1];
			$("span[id="+value+"_0]").attr("style","color: #000000;  background-color: #FFFF00");
			$("span[id="+value+"]").attr("style","color: #000000;  background-color: #FFFF00");
			//记住本次操作的id
			$("#tempName").val(value);
		});

		if($.browser.msie )
			$(".project_box01,.project_box02").css("width","45%");
	});
	</script>

</head>

<body>
	<div style="width: 970px; position: absolute; left: 50%; margin-left: -485px; ">
		<fmt:formatNumber var="norm" value="${result.norm}" maxFractionDigits="4" />
		<input type="hidden" id="tempName" />
		<div class="win_main" style="padding:20px; overflow:hidden;padding-top:0px;">
			<div class="contrast_tit">
				相似结果查看 (相似度<span style="color:red"><fmt:formatNumber value="${result.cmp_result*100 }" pattern="##.##"/>%</span>)
			</div>
			<div id="tabnav">
				<ul>
					<li class="down" id="tab1" onclick="changeTab(this.id)">
					    <a href="###"><span>项目内容(<font id="f3"><fmt:formatNumber value="${result.result1*100 }" pattern="##.##"/>%</font>)</span></a>
						<script type="text/javascript">
							if(parseFloat('${result.result1}') >= 0.5) $("#f3").css("color","red");
						</script>
					</li>
					<c:if test="${isSameGrant eq true}">
						<li id="tab2" onclick="changeTab(this.id)">
						    <a href="###"><span>授权号(<font id="f1"><fmt:formatNumber value="${result.result3*100 }" pattern="##.##"/>%</font>)</span></a>
							<script type="text/javascript">
								 if(parseFloat('${result.result3}') >= parseFloat('0.5')) $("#f1").css("color","red");
							</script>
						</li>
					</c:if>
					<c:if test="${isSameGrant eq true}">
						<li id="tab3" onclick="changeTab(this.id)">
						    <a href="###"><span>论文著作名称(<font id="f4"><fmt:formatNumber value="${result.result4*100 }" pattern="##.##"/>%</font>)</span></a>
							<script type="text/javascript">
								if(parseFloat('${result.result4}') >= parseFloat('0.5'))
									$("#f4").css("color","red");
							</script>
						</li>
					</c:if>
				</ul>
			</div>
			 <div class="tab_box" id="fragment-tab1">
				<jsp:include page="./prpCompare.jsp">
					<jsp:param value="${sourceContentList[0]}" name="sourceContent" />
					<jsp:param value="${targetContentList[0]}" name="targetContent" />
				</jsp:include>
			</div> 
			<div class="tab_box" id="fragment-tab2" style="display: none">
				<jsp:include page="./prpCompare-approve.jsp">
					<jsp:param value="${sourceContentList[1]}" name="sourceContent" />
					<jsp:param value="${targetContentList[1]}" name="targetContent" />
				</jsp:include>
			</div>
			<div class="tab_box" id="fragment-tab3" style="display: none">
				<jsp:include page="./prpCompare-paper.jsp">
					<jsp:param value="${sourceContentList[2]}" name="sourceContent" />
					<jsp:param value="${targetContentList[2]}" name="targetContent" />
				</jsp:include>
			</div>
			<div class="clear" style="height: 0px; overflow: hidden;"></div>
		</div>
	</div>
</body>
</html>
